package org.example.ims.Service.Order;

import org.example.ims.DTO.StockInOutDTO;
import org.example.ims.Entity.Base.Product;
import org.example.ims.Entity.Base.Warehouse;
import org.example.ims.Entity.Order.InStockDetail;
import org.springframework.data.domain.Page;

import java.util.List;

public interface InStockDetailService {

    InStockDetail createDetail(InStockDetail detail);
    InStockDetail updateDetail(Integer detailId, InStockDetail detail);
    void deleteDetail(Integer detailId);
    InStockDetail getDetailById(Integer detailId);
    Page<InStockDetail> getAllDetails(Integer page, Integer size);
    Page<InStockDetail> searchDetails(Integer orderId, Integer productId , Integer page, Integer size);

    //有效性判断 判断productId是否存在，仓库容量是否可行
    StockInOutDTO<Product> validityAssessment (List<InStockDetail> details, Warehouse warehouse);
    //执行操作，对于库的执行
    //void

}